package com.muyu.cloud.commodity.mapper;

import com.muyu.cloud.commodity.info.SpecGroupInfo;
import com.muyu.cloud.commodity.info.SpecValueInfo;
import com.muyu.cloud.commodity.domain.model.ProductSkuSpec;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @
 * @descriptions: ProductSkuSpecMapper
 * @author: LiuSuo
 * @date: 11:26
 * @version: 1.0
 */
@Mapper
public interface ProductSkuSpecMapper {
    List<Long> selectValidSpecValueIds(@Param("specValueIds") List<Long> specValueIds);

    void batchInsert(@Param("skuSpecList") List<ProductSkuSpec> skuSpecList);

    void deleteBySkuId(@Param("id") Long id);

    List<String> selectSpecValueNamesBySkuId(@Param("id") Long id);

    List<SpecGroupInfo> selectSpecGroupsByProductId(@Param("id") Long id);

    List<SpecValueInfo> selectSpecValuesByGroupId(@Param("groupId") Long groupId);

    List<Long> selectSpecValueIdsBySkuId(@Param("id") Long id);
}
